<?php 

/* Save the uppercase field, see setup_profile.php for field itself */

add_action( 'personal_options_update', 'my_save_extra_fields' );
add_action( 'edit_user_profile_update', 'my_save_extra_fields' );

function my_save_extra_fields( $user_id ) {
  
	if ( !current_user_can( 'edit_user', $user_id ) )
		return false;
	
	update_user_meta( $user_id, 'uppercase', ( $_POST['uppercase'] == 'on' ? '1' : '0' ) );
	
}


/* Make the site uppercase if selected in profile */

add_action('wp_head', 'make_site_uppercase');
add_action('admin_head', 'make_site_uppercase');

function make_site_uppercase() {
  
  global $current_user;
  get_currentuserinfo();
  
  echo ( get_user_meta( $current_user->ID, 'uppercase', true ) == '1' ? '<style type="text/css">* { text-transform: uppercase !important; }</style>' : '' );
  
}

?>